summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
cfd2765)
Log message:
Correct the issue where a 0 expiration time on a new G-line causes funny
behavior. Instead, for server-issued G-lines, try hard by propagating a
G-line activation/deactivation for G-lines we know nothing about, instead
of calling gline_add().
Also, the make_gline() function now asserts that expire != 0.
Note: it will not be necessary to release a .13 immediately. The REMGLINE
issue can be easily worked around within euworld, and Isomer is making the
appropriate changes.
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1859
c9e4aea6-c8fd-4c43-8297-
357d70d61c8c
+2007-12-13 Kevin L. Mitchell <klmitch@mit.edu>
+
+ * ircd/m_gline.c (ms_gline): if we got an activate or deactivate
+ for a global G-line we never heard of, and we cannot create it
+ because no expire time was sent, manually propagate the G-line
+ instead of trying to call gline_add()
+
+ * ircd/gline.c (make_gline): never allow a G-line to be created
+ with a 0 expire time
+
2007-12-03 Michael Poole <mdpoole@troilus.org>
* include/patchlevel.h (PATCHLEVEL): Bump for u2.10.12.12 release.
2007-12-03 Michael Poole <mdpoole@troilus.org>
* include/patchlevel.h (PATCHLEVEL): Bump for u2.10.12.12 release.
gline = (struct Gline *)MyMalloc(sizeof(struct Gline)); /* alloc memory */
assert(0 != gline);
gline = (struct Gline *)MyMalloc(sizeof(struct Gline)); /* alloc memory */
assert(0 != gline);
assert(action != GLINE_LOCAL_DEACTIVATE);
assert(action != GLINE_MODIFY);
assert(action != GLINE_LOCAL_DEACTIVATE);
assert(action != GLINE_MODIFY);
+ if (!expire) { /* Cannot *add* a G-line we don't have, but try hard */
+ Debug((DEBUG_DEBUG, "Propagating G-line %s for G-line we don't have",
+ action == GLINE_ACTIVATE ? "activation" : "deactivation"));
+
+ /* propagate the G-line, even though we don't have it */
+ sendcmdto_serv_butone(sptr, CMD_GLINE, cptr, "* %c%s %Tu",
+ action == GLINE_ACTIVATE ? '+' : '-',
+ mask, lastmod);
+
+ return 0;
+ }
+
return gline_add(cptr, sptr, mask, reason, expire, lastmod, lifetime,
flags | ((action == GLINE_ACTIVATE) ? GLINE_ACTIVE : 0));
}
return gline_add(cptr, sptr, mask, reason, expire, lastmod, lifetime,
flags | ((action == GLINE_ACTIVATE) ? GLINE_ACTIVE : 0));
}