Jump to content

  •  

Bug Tracker Migration

June 3rd
Good news everyone! The staff has decided that it is time to slowly kill off this Bug Tracker. We will begin the process of slowly migrating from this Bug Tracker over to our Github Issues which can be found here: https://github.com/HerculesWS/Hercules/issues

Over the next couple of days, I will be closing off any opportunity to create new reports. However, I still will keep the opportunity to reply to existing Bug Reports. Doing this will allow us to slowly fix any bug reports we have listed here so that we can easily migrate over to our Issue Tracker.

Update - June 7th 2015: Creating new bug posts has been disabled. Please use our https://github.com/HerculesWS/Hercules/issues tracker to post bugs. Users are still able to reply to existing bug posts.

- Administration

Issue Information

Issue Confirmations

  • Yes (0)No (0)
Photo

Mail System Mms-bug

Posted by Hercules Bot on 09 June 2008 - 05:17 PM

Originally posted by Meyraw
http://www.eathena.w...er&showbug=1651

Mail system works perfectly with MMS(multi-map-server) setup except one thing: when you send mail from one map-server to another, you

1) do not receive a notification
2) gotta relogin to receive a new mail

Why the problem occurs:

1. In the map-server, the new mail retrieval (from SQL) occurs ONLY if  "sd->mail.inbox.changed == true"

2. The only place where we make it "true" is here:
intif.c:
<...>
static void intif_parse_Mail_new(int fd)
<...>
sd->mail.inbox.changed = true;
<...>

3. It is the function that parses a "new mail" notification from the char-server. So, our second problem is caused by the first one: once we receive notification, eA will know that we want to load a new mail from sql, not from internal map-server db.


Solution:
1. Make char-server(not the map-server) send notifications:

Char server already sends notifications in all cases but the ordinary mail sending. So...

Find and ADD (char-server)
int_mail.c:
<...>
static void mapif_parse_Mail_send(int fd)
<...>
mapif_Mail_send(fd, &msg); // we send the "mail sent" notification to the sender
+ mapif_Mail_new(&msg);       // we send the "new mail" notification to the receiver
}

2. Remove the notification sending from the map-server
Find and REMOVE (map-server)
intif.c:
<...>
static void intif_parse_Mail_send(int fd)
<...>

- if( (sd = map_charid2sd(msg.dest_id)) )
- {
- sd->mail.inbox.changed = true;
- clif_Mail_new(sd->fd, msg.id, msg.send_name, msg.title);
- }

Now char-server sends mail notifications, and everything works fine.

Hope to see it fixed, thx.

This post has been edited by Meyraw: Jun 9 2008, 10:18 AM

Originally posted by Gepard
Fixed in [rev=15684].