Skip to content

Commit 100254e

Browse files
scummosaburgm
authored andcommitted
Provide the node path to session_new
1 parent e234f8d commit 100254e

File tree

7 files changed

+37
-4
lines changed

7 files changed

+37
-4
lines changed

infinoted/plugins/infinoted-plugin-note-chat.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ infinoted_plugin_note_chat_session_new(InfIo* io,
4444
InfSessionStatus status,
4545
InfCommunicationGroup* sync_group,
4646
InfXmlConnection* sync_connection,
47+
const gchar* path,
4748
gpointer user_data)
4849
{
4950
InfChatBuffer* buffer;

infinoted/plugins/infinoted-plugin-note-text.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ infinoted_plugin_note_text_session_new(InfIo* io,
3939
InfSessionStatus status,
4040
InfCommunicationGroup* sync_group,
4141
InfXmlConnection* sync_connection,
42+
const gchar* path,
4243
gpointer user_data)
4344
{
4445
InfTextSession* session;

libinfinity/adopted/inf-adopted-session-replay.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,7 @@ inf_adopted_session_replay_set_record(InfAdoptedSessionReplay* replay,
833833
INF_SESSION_SYNCHRONIZING,
834834
INF_COMMUNICATION_GROUP(priv->client_group),
835835
INF_XML_CONNECTION(priv->client_conn),
836+
NULL,
836837
plugin->user_data
837838
)
838839
);

libinfinity/client/infc-browser.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2742,6 +2742,7 @@ infc_browser_subscribe_session(InfcBrowser* browser,
27422742
InfcBrowserPrivate* priv;
27432743
InfcSessionProxy* proxy;
27442744
InfBrowserIter iter;
2745+
GString* path;
27452746
InfSession* session;
27462747

27472748
priv = INFC_BROWSER_PRIVATE(browser);
@@ -2750,6 +2751,9 @@ infc_browser_subscribe_session(InfcBrowser* browser,
27502751
g_assert(node->shared.known.plugin != NULL);
27512752
g_assert(node->shared.known.session == NULL);
27522753

2754+
path = g_string_sized_new(128);
2755+
infc_browser_node_get_path_string(node, path);
2756+
27532757
if(initial_sync)
27542758
{
27552759
session = node->shared.known.plugin->session_new(
@@ -2758,6 +2762,7 @@ infc_browser_subscribe_session(InfcBrowser* browser,
27582762
INF_SESSION_SYNCHRONIZING,
27592763
INF_COMMUNICATION_GROUP(group),
27602764
connection,
2765+
path->str,
27612766
node->shared.known.plugin->user_data
27622767
);
27632768
}
@@ -2769,10 +2774,13 @@ infc_browser_subscribe_session(InfcBrowser* browser,
27692774
INF_SESSION_RUNNING,
27702775
NULL,
27712776
NULL,
2777+
path->str,
27722778
node->shared.known.plugin->user_data
27732779
);
27742780
}
27752781

2782+
g_string_free(path, TRUE);
2783+
27762784
proxy = g_object_new(INFC_TYPE_SESSION_PROXY, "session", session, NULL);
27772785

27782786
inf_communication_group_set_target(

libinfinity/client/infc-note-plugin.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ typedef InfSession*(*InfcNotePluginSessionNew)(InfIo*,
3434
InfSessionStatus,
3535
InfCommunicationGroup*,
3636
InfXmlConnection*,
37+
const char*,
3738
gpointer);
3839

3940
typedef struct _InfcNotePlugin InfcNotePlugin;

libinfinity/server/infd-directory.c

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1821,7 +1821,8 @@ infd_directory_create_session_proxy(InfdDirectory* directory,
18211821
InfSessionStatus status,
18221822
InfCommunicationHostedGroup* sync_g,
18231823
InfXmlConnection* sync_conn,
1824-
InfCommunicationHostedGroup* sub_g)
1824+
InfCommunicationHostedGroup* sub_g,
1825+
const char* path)
18251826
{
18261827
InfdDirectoryPrivate* priv;
18271828
InfSession* session;
@@ -1837,6 +1838,7 @@ infd_directory_create_session_proxy(InfdDirectory* directory,
18371838
status,
18381839
INF_COMMUNICATION_GROUP(sync_g),
18391840
sync_conn,
1841+
path,
18401842
plugin->user_data
18411843
);
18421844

@@ -3910,6 +3912,7 @@ infd_directory_add_subreq_add_node(InfdDirectory* directory,
39103912
{
39113913
InfdDirectorySubreq* subreq;
39123914
InfdSessionProxy* proxy;
3915+
gchar* path;
39133916
gboolean ensured;
39143917

39153918
if(session != NULL)
@@ -3922,14 +3925,19 @@ infd_directory_add_subreq_add_node(InfdDirectory* directory,
39223925
}
39233926
else
39243927
{
3928+
infd_directory_node_make_path(parent, name, &path, NULL);
3929+
39253930
proxy = infd_directory_create_session_proxy(
39263931
directory,
39273932
plugin,
39283933
INF_SESSION_RUNNING,
39293934
NULL,
39303935
NULL,
3931-
group
3936+
group,
3937+
path
39323938
);
3939+
3940+
g_free(path);
39333941
}
39343942

39353943
ensured = infd_directory_session_proxy_ensure(
@@ -3982,8 +3990,11 @@ infd_directory_add_subreq_sync_in(InfdDirectory* directory,
39823990
{
39833991
InfdDirectorySubreq* subreq;
39843992
InfdSessionProxy* proxy;
3993+
gchar* path;
39853994
gboolean ensured;
39863995

3996+
infd_directory_node_make_path(parent, name, &path, NULL);
3997+
39873998
/* Keep proxy in PRESYNC state, until we have the confirmation from the
39883999
* remote site that the chosen method is OK and we can go on. */
39894000
proxy = infd_directory_create_session_proxy(
@@ -3992,9 +4003,12 @@ infd_directory_add_subreq_sync_in(InfdDirectory* directory,
39924003
INF_SESSION_PRESYNC,
39934004
sync_group,
39944005
connection,
3995-
sub_group
4006+
sub_group,
4007+
path
39964008
);
39974009

4010+
g_free(path);
4011+
39984012
ensured = infd_directory_session_proxy_ensure(
39994013
directory,
40004014
parent,
@@ -4542,6 +4556,7 @@ infd_directory_node_add_note(InfdDirectory* directory,
45424556
const gchar* method;
45434557
InfdDirectorySubreq* subreq;
45444558
InfdSessionProxy* proxy;
4559+
gchar* path;
45454560
gboolean ensured;
45464561
GError* local_error;
45474562

@@ -4648,14 +4663,19 @@ infd_directory_node_add_note(InfdDirectory* directory,
46484663
}
46494664
else
46504665
{
4666+
infd_directory_node_make_path(parent, name, &path, NULL);
4667+
46514668
proxy = infd_directory_create_session_proxy(
46524669
directory,
46534670
plugin,
46544671
INF_SESSION_RUNNING,
46554672
NULL,
46564673
NULL,
4657-
group
4674+
group,
4675+
path
46584676
);
4677+
4678+
g_free(path);
46594679
}
46604680

46614681
ensured = infd_directory_session_proxy_ensure(

libinfinity/server/infd-note-plugin.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ typedef InfSession*(*InfdNotePluginSessionNew)(InfIo*,
3737
InfSessionStatus,
3838
InfCommunicationGroup*,
3939
InfXmlConnection*,
40+
const char*,
4041
gpointer);
4142

4243
typedef InfSession*(*InfdNotePluginSessionRead)(InfdStorage*,

0 commit comments

Comments
 (0)