[eggheads-patches] PATCH 1.6/1.7: Sharing is disabled (noshare=1)

Bryan Drewery lordares at shatow.net
Fri Apr 29 14:04:42 CST 2005


diff -u -d -p -r1.6 share.c
There is a rare occasion here where noshare should be set to 1 and stay 
that way, potentially not sending out changes to userfile when it should.

the return fails to set noshare back to 0, which is done below this block 
of code. Patch fixes.


--- src/mod/share.mod/share.c   21 Jan 2005 01:43:42 -0000      1.6
+++ src/mod/share.mod/share.c   29 Apr 2005 20:02:58 -0000
@@ -617,8 +617,10 @@ static void share_change(int idx, char *
            makepass(pass);
            userlist = adduser(userlist, hand, "none", pass, USER_BOT);
            u = get_user_by_handle(userlist, hand);
-        } else if (!u)
+        } else if (!u) {
+          noshare = 0;
            return;
+        }
          if (uet->got_share) {
            if (!(e = find_user_entry(uet, u))) {
              e = user_malloc(sizeof(struct user_entry));


------
Bryan Drewery




More information about the Patches mailing list