/[axel]/trunk/conn.c
ViewVC logotype

Diff of /trunk/conn.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 13 by appaji-guest, Wed Jan 16 07:30:52 2008 UTC revision 14 by appaji-guest, Wed Jan 16 07:56:47 2008 UTC
# Line 74  int conn_set( conn_t *conn, char *set_ur Line 74  int conn_set( conn_t *conn, char *set_ur
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    
# Line 89  int conn_set( conn_t *conn, char *set_ur Line 89  int conn_set( conn_t *conn, char *set_ur
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                                     */
# Line 112  int conn_set( conn_t *conn, char *set_ur Line 112  int conn_set( conn_t *conn, char *set_ur
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 )

Legend:
Removed from v.13  
changed lines
  Added in v.14

  ViewVC Help
Powered by ViewVC 1.1.5