| 74 |
*j = '?'; |
*j = '?'; |
| 75 |
if( i == NULL ) |
if( i == NULL ) |
| 76 |
{ |
{ |
| 77 |
strcpy( conn->file, conn->dir ); |
strncpy( conn->file, conn->dir, MAX_STRING ); |
| 78 |
strcpy( conn->dir, "/" ); |
strcpy( conn->dir, "/" ); |
| 79 |
} |
} |
| 80 |
else |
else |
| 81 |
{ |
{ |
| 82 |
strcpy( conn->file, i + 1 ); |
strncpy( conn->file, i + 1, MAX_STRING ); |
| 83 |
strcat( conn->dir, "/" ); |
strcat( conn->dir, "/" ); |
| 84 |
} |
} |
| 85 |
|
|
| 89 |
strncpy( conn->user, conn->host, MAX_STRING ); |
strncpy( conn->user, conn->host, MAX_STRING ); |
| 90 |
i = strrchr( conn->user, '@' ); |
i = strrchr( conn->user, '@' ); |
| 91 |
*i = 0; |
*i = 0; |
| 92 |
strcpy( conn->host, i + 1 ); |
strncpy( conn->host, i + 1, MAX_STRING ); |
| 93 |
*conn->pass = 0; |
*conn->pass = 0; |
| 94 |
} |
} |
| 95 |
/* If not: Fill in defaults */ |
/* If not: Fill in defaults */ |
| 112 |
if( ( i = strchr( conn->user, ':' ) ) != NULL ) |
if( ( i = strchr( conn->user, ':' ) ) != NULL ) |
| 113 |
{ |
{ |
| 114 |
*i = 0; |
*i = 0; |
| 115 |
strcpy( conn->pass, i + 1 ); |
strncpy( conn->pass, i + 1, MAX_STRING ); |
| 116 |
} |
} |
| 117 |
/* Port number? */ |
/* Port number? */ |
| 118 |
if( ( i = strchr( conn->host, ':' ) ) != NULL ) |
if( ( i = strchr( conn->host, ':' ) ) != NULL ) |