diff options
author | George Hazan <ghazan@miranda.im> | 2017-01-20 00:11:36 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-01-20 00:11:36 +0300 |
commit | 92b173c3a8553b59077aa2757c9627cb4c73d29e (patch) | |
tree | 99b7ebeff5c84ff27f1908eea79992e60618840f /src | |
parent | 92e81067e7e81cefcea58f7e91f6d2d8c959fd0d (diff) |
Chat_NewSession to return a pointer to a newly created session, not to dig it anymore
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_app/src/chat_svc.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mir_app/src/chat_svc.cpp b/src/mir_app/src/chat_svc.cpp index 8d15f996d1..2a09052ef1 100644 --- a/src/mir_app/src/chat_svc.cpp +++ b/src/mir_app/src/chat_svc.cpp @@ -187,7 +187,7 @@ MIR_APP_DLL(int) Chat_Register(const GCREGISTER *gcr) /////////////////////////////////////////////////////////////////////////////////////////
// starts new chat session
-EXTERN_C MIR_APP_DLL(int) Chat_NewSession(
+EXTERN_C MIR_APP_DLL(GCSessionInfoBase*) Chat_NewSession(
int iType, // Use one of the GCW_* flags above to set the type of session
const char *pszModule, // The name of the protocol owning the session (the same as pszModule when you register)
const wchar_t *ptszID, // The unique identifier for the session.
@@ -197,7 +197,7 @@ EXTERN_C MIR_APP_DLL(int) Chat_NewSession( mir_cslockfull lck(csChat);
MODULEINFO *mi = chatApi.MM_FindModule(pszModule);
if (mi == NULL)
- return GC_ERROR;
+ return NULL;
// try to restart a session first
SESSION_INFO *si = chatApi.SM_FindSession(ptszID, pszModule);
@@ -212,7 +212,7 @@ EXTERN_C MIR_APP_DLL(int) Chat_NewSession( if (chatApi.OnReplaceSession)
chatApi.OnReplaceSession(si);
- return 0;
+ return si;
}
// create a new session
@@ -265,7 +265,7 @@ EXTERN_C MIR_APP_DLL(int) Chat_NewSession( if (chatApi.OnCreateSession)
chatApi.OnCreateSession(si, mi);
- return 0;
+ return si;
}
/////////////////////////////////////////////////////////////////////////////////////////
|