mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-28 05:29:48 +00:00
fd3eb836b9
o Fix long standing issue with upload feature: client would freeze in semwait state. It was a pthread vs semaphore issue and a database lookup issue. Check PR for complete report o All patches are related to upload feature fix PR: 41323
29 lines
686 B
C
29 lines
686 B
C
--- src/mydb.c.orig Mon Jul 22 13:48:07 2002
|
|
+++ src/mydb.c Mon Jul 22 19:21:42 2002
|
|
@@ -1141,6 +1141,16 @@
|
|
int file_in_db(char *filename, int *virtual)
|
|
{
|
|
int i;
|
|
+ char *filename_internal;
|
|
+
|
|
+ if ((filename != NULL) && (filename[0]=='/'))
|
|
+ {
|
|
+ if(hide_absolute==0)
|
|
+ filename_internal=filename;
|
|
+ else
|
|
+ filename_internal=filename+1;
|
|
+ } else
|
|
+ filename_internal=filename;
|
|
|
|
G_LOCK(shared_info);
|
|
if(shared_info!=NULL)
|
|
@@ -1151,7 +1161,7 @@
|
|
|
|
/* DB_ENTRY to compare */
|
|
de=&(g_array_index(shared_info,DB_ENTRY,i));
|
|
- if(!strcmp(de->filename,filename))
|
|
+ if(!strcmp(de->filename,filename_internal))
|
|
{
|
|
*virtual=de->virtual;
|
|
G_UNLOCK(shared_info);
|