Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Cellframe Node Plugin Chat
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cellframe
Cellframe Node Plugin Chat
Commits
4ee6482a
Commit
4ee6482a
authored
6 years ago
by
Aleksandr Lysikov
Browse files
Options
Downloads
Patches
Plain Diff
renamed stream_ch_pkt_write() to dap_stream_ch_pkt_write()
parent
dede25eb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dap_stream_ch_chat.c
+10
-10
10 additions, 10 deletions
dap_stream_ch_chat.c
with
10 additions
and
10 deletions
dap_stream_ch_chat.c
+
10
−
10
View file @
4ee6482a
...
@@ -206,7 +206,7 @@ static void ch_chat_get_channel_members(stream_ch_t * ch)
...
@@ -206,7 +206,7 @@ static void ch_chat_get_channel_members(stream_ch_t * ch)
strcat
(
ch_pkt_out
->
data
,
"</channel_subscribers>
\n
"
);
strcat
(
ch_pkt_out
->
data
,
"</channel_subscribers>
\n
"
);
stream_ch_pkt_write_f
(
ch
,
't'
,(
const
char
*
)
ch_pkt_out
,
NULL
);
dap_
stream_ch_pkt_write_f
(
ch
,
't'
,(
const
char
*
)
ch_pkt_out
,
NULL
);
free
(
channel_id
);
free
(
subscribers_id
);
free
(
ch_pkt_out
);
free
(
channel_id
);
free
(
subscribers_id
);
free
(
ch_pkt_out
);
}
}
...
@@ -253,7 +253,7 @@ static void ch_chat_get_list_channels(stream_ch_t * ch)
...
@@ -253,7 +253,7 @@ static void ch_chat_get_list_channels(stream_ch_t * ch)
ch_pkt_out
->
header
.
op_code
=
CHAT_PACKET_OP_CODE_GET_LIST_CHANNEL
;
ch_pkt_out
->
header
.
op_code
=
CHAT_PACKET_OP_CODE_GET_LIST_CHANNEL
;
strcpy
(
ch_pkt_out
->
data
,
xml_out
);
strcpy
(
ch_pkt_out
->
data
,
xml_out
);
stream_ch_pkt_write_f
(
ch
,
't'
,(
const
char
*
)
ch_pkt_out
,
NULL
);
dap_
stream_ch_pkt_write_f
(
ch
,
't'
,(
const
char
*
)
ch_pkt_out
,
NULL
);
free
(
xml_out
);
free
(
xml_out
);
free
(
ch_pkt_out
);
free
(
ch_pkt_out
);
...
@@ -282,7 +282,7 @@ static void ch_chat_get_contacts_domain(stream_ch_t * ch)
...
@@ -282,7 +282,7 @@ static void ch_chat_get_contacts_domain(stream_ch_t * ch)
strcpy
(
ch_pkt_out
->
data
,
contacts
);
strcpy
(
ch_pkt_out
->
data
,
contacts
);
stream_ch_pkt_write_f
(
ch
,
't'
,(
const
char
*
)
ch_pkt_out
,
NULL
);
dap_
stream_ch_pkt_write_f
(
ch
,
't'
,(
const
char
*
)
ch_pkt_out
,
NULL
);
free
(
contacts
);
free
(
contacts
);
free
(
ch_pkt_out
);
free
(
ch_pkt_out
);
...
@@ -327,7 +327,7 @@ static void ch_chat_return_N_channel_msgs(stream_ch_t * ch, char* data)
...
@@ -327,7 +327,7 @@ static void ch_chat_return_N_channel_msgs(stream_ch_t * ch, char* data)
ch_pkt_out
->
header
.
op_code
=
CHAT_PACKET_OP_CODE_GET_LAST_N_MESSAGE_IN_CHANNEL
;
ch_pkt_out
->
header
.
op_code
=
CHAT_PACKET_OP_CODE_GET_LAST_N_MESSAGE_IN_CHANNEL
;
strcpy
(
ch_pkt_out
->
data
,
xml_out
);
strcpy
(
ch_pkt_out
->
data
,
xml_out
);
stream_ch_pkt_write_f
(
ch
,
't'
,(
const
char
*
)
ch_pkt_out
,
NULL
);
dap_
stream_ch_pkt_write_f
(
ch
,
't'
,(
const
char
*
)
ch_pkt_out
,
NULL
);
free
(
ch_pkt_out
);
free
(
ch_pkt_out
);
free
(
xml_out
);
free
(
xml_out
);
...
@@ -339,7 +339,7 @@ static void send_empty_pkt(stream_ch_t * ch, int op_code)
...
@@ -339,7 +339,7 @@ static void send_empty_pkt(stream_ch_t * ch, int op_code)
{
{
DapChannelChatPkt_t
*
ch_pkt_out
=
(
DapChannelChatPkt_t
*
)
calloc
(
1
,
sizeof
(
ch_pkt_out
->
header
)
+
30
);
DapChannelChatPkt_t
*
ch_pkt_out
=
(
DapChannelChatPkt_t
*
)
calloc
(
1
,
sizeof
(
ch_pkt_out
->
header
)
+
30
);
ch_pkt_out
->
header
.
op_code
=
op_code
;
ch_pkt_out
->
header
.
op_code
=
op_code
;
stream_ch_pkt_write_f
(
ch
,
't'
,(
const
char
*
)
ch_pkt_out
,
NULL
);
dap_
stream_ch_pkt_write_f
(
ch
,
't'
,(
const
char
*
)
ch_pkt_out
,
NULL
);
free
(
ch_pkt_out
);
free
(
ch_pkt_out
);
}
}
...
@@ -361,7 +361,7 @@ static void ch_chat_get_user_information(stream_ch_t * ch, char* data)
...
@@ -361,7 +361,7 @@ static void ch_chat_get_user_information(stream_ch_t * ch, char* data)
ch_pkt_out
->
header
.
op_code
=
CHAT_PACKET_OP_CODE_GET_USER_INFORMATION
;
ch_pkt_out
->
header
.
op_code
=
CHAT_PACKET_OP_CODE_GET_USER_INFORMATION
;
}
}
stream_ch_pkt_write_f
(
ch
,
't'
,(
const
char
*
)
ch_pkt_out
,
NULL
);
dap_
stream_ch_pkt_write_f
(
ch
,
't'
,(
const
char
*
)
ch_pkt_out
,
NULL
);
free
(
ch_pkt_out
);
free
(
xml_out
);
free
(
ch_pkt_out
);
free
(
xml_out
);
}
}
...
@@ -391,7 +391,7 @@ static void ch_chat_change_contact_list(stream_ch_t * ch, char* data, int op_cod
...
@@ -391,7 +391,7 @@ static void ch_chat_change_contact_list(stream_ch_t * ch, char* data, int op_cod
else
else
strcpy
((
char
*
)
ch_pkt_out
->
data
,
"Contact not added"
);
strcpy
((
char
*
)
ch_pkt_out
->
data
,
"Contact not added"
);
stream_ch_pkt_write_f
(
ch
,
't'
,(
const
char
*
)
ch_pkt_out
,
NULL
);
dap_
stream_ch_pkt_write_f
(
ch
,
't'
,(
const
char
*
)
ch_pkt_out
,
NULL
);
break
;
break
;
}
}
case
CHAT_PACKET_OP_CODE_DELETE_CONTACT
:
case
CHAT_PACKET_OP_CODE_DELETE_CONTACT
:
...
@@ -401,7 +401,7 @@ static void ch_chat_change_contact_list(stream_ch_t * ch, char* data, int op_cod
...
@@ -401,7 +401,7 @@ static void ch_chat_change_contact_list(stream_ch_t * ch, char* data, int op_cod
else
else
strcpy
((
char
*
)
ch_pkt_out
->
data
,
"Error removed"
);
strcpy
((
char
*
)
ch_pkt_out
->
data
,
"Error removed"
);
stream_ch_pkt_write_f
(
ch
,
't'
,(
const
char
*
)
ch_pkt_out
,
NULL
);
dap_
stream_ch_pkt_write_f
(
ch
,
't'
,(
const
char
*
)
ch_pkt_out
,
NULL
);
break
;
break
;
default:
default:
log_it
(
WARNING
,
"Unknown op_code"
);
log_it
(
WARNING
,
"Unknown op_code"
);
...
@@ -428,7 +428,7 @@ static void ch_chat_get_all_user_contacts(stream_ch_t * ch)
...
@@ -428,7 +428,7 @@ static void ch_chat_get_all_user_contacts(stream_ch_t * ch)
"<user_contacts>
\n
</user_contacts>"
);
"<user_contacts>
\n
</user_contacts>"
);
ch_pkt_out
->
header
.
op_code
=
CHAT_PACKET_OP_CODE_GET_ALL_CONTACTS
;
ch_pkt_out
->
header
.
op_code
=
CHAT_PACKET_OP_CODE_GET_ALL_CONTACTS
;
stream_ch_pkt_write_f
(
ch
,
't'
,(
const
char
*
)
ch_pkt_out
,
NULL
);
dap_
stream_ch_pkt_write_f
(
ch
,
't'
,(
const
char
*
)
ch_pkt_out
,
NULL
);
free
(
login
);
free
(
login
);
free
(
domain
);
free
(
domain
);
free
(
ch_pkt_out
);
free
(
ch_pkt_out
);
...
@@ -460,7 +460,7 @@ static void ch_chat_get_all_user_contacts(stream_ch_t * ch)
...
@@ -460,7 +460,7 @@ static void ch_chat_get_all_user_contacts(stream_ch_t * ch)
}
}
strcat
(
ch_pkt_out
->
data
,
"</user_contacts>"
);
strcat
(
ch_pkt_out
->
data
,
"</user_contacts>"
);
stream_ch_pkt_write_f
(
ch
,
't'
,
(
const
char
*
)
ch_pkt_out
,
NULL
);
dap_
stream_ch_pkt_write_f
(
ch
,
't'
,
(
const
char
*
)
ch_pkt_out
,
NULL
);
free
(
login
);
free
(
login
);
free
(
domain
);
free
(
domain
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment