]> code.citadel.org Git - citadel.git/commitdiff
CtdlFillSystemContext() gone too
authorArt Cancro <ajc@uncensored.citadel.org>
Mon, 4 Apr 2011 20:02:21 +0000 (16:02 -0400)
committerArt Cancro <ajc@uncensored.citadel.org>
Mon, 4 Apr 2011 20:02:21 +0000 (16:02 -0400)
citadel/context.c
citadel/include/ctdl_module.h
citadel/sysdep.c

index a60dbd420d3c7820262226679780a9c8b9d57273..72516acecb83406382824439619e9ce0bb38eac1 100644 (file)
@@ -448,42 +448,6 @@ CitContext *CtdlGetContextArray(int *count)
 }
 
 
-
-/*
- * This function fills in a context and its user field correctly
- * Then creates/loads that user
- */
-void CtdlFillSystemContext(CitContext *context, char *name)
-{
-       char sysname[SIZ];
-       long len;
-
-       memset(context, 0, sizeof(CitContext));
-       context->internal_pgm = 1;
-       context->cs_pid = 0;
-       strcpy (sysname, "SYS_");
-       strcat (sysname, name);
-       len = cutuserkey(sysname);
-       memcpy(context->curr_user, sysname, len + 1);
-       context->client_socket = (-1);
-
-       /* internal_create_user has the side effect of loading the user regardless of wether they
-        * already existed or needed to be created
-        */
-       internal_create_user (sysname, len, &(context->user), -1) ;
-       
-       /* Check to see if the system user needs upgrading */
-       if (context->user.usernum == 0)
-       {       /* old system user with number 0, upgrade it */
-               context->user.usernum = get_new_user_number();
-               syslog(LOG_DEBUG, "Upgrading system user \"%s\" from user number 0 to user number %ld\n", context->user.fullname, context->user.usernum);
-               /* add user to the database */
-               CtdlPutUser(&(context->user));
-               cdb_store(CDB_USERSBYNUMBER, &(context->user.usernum), sizeof(long), context->user.fullname, strlen(context->user.fullname)+1);
-       }
-}
-
-
 /*
  * Cleanup any contexts that are left lying around
  */
index 3456a98e3d50991109be49af306c2df2c6d6e8a1..e05f95f8637fb34300bf52928a59a324e2cb5744 100644 (file)
@@ -157,7 +157,6 @@ void CtdlModuleStartCryptoMsgs(char *ok_response, char *nosup_response, char *er
  * You must free the returned pointer when done.
  */
 struct CitContext *CtdlGetContextArray (int *count);
-void CtdlFillSystemContext(struct CitContext *context, char *name);
 int CtdlTrySingleUser(void);
 void CtdlEndSingleUser(void);
 int CtdlWantSingleUser(void);
index ead650b65dcea9b376932839e7defc2e315d896b..c264640168d132f0e469fa156e00d024d44b22d6 100644 (file)
@@ -1323,9 +1323,6 @@ void *select_on_master(void *blah)
        int retval;
        struct CitContext select_on_master_CC;
 
-       CtdlFillSystemContext(&select_on_master_CC, "select_on_master");
-       pthread_setspecific(MyConKey, (void *)&select_on_master_CC);
-
        while (!server_shutting_down) {
                /* Initialize the fdset. */
                FD_ZERO(&master_fds);