Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
FORMUS3IC_LAS3
/
embb
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9d9184e6
authored
Dec 19, 2014
by
Marcus Winter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mtapi_network_c: fixed cpplint warnings
parent
2f41857b
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
31 additions
and
27 deletions
+31
-27
mtapi_network_c/src/embb_mtapi_network.c
+5
-4
mtapi_network_c/src/embb_mtapi_network.h
+3
-3
mtapi_network_c/src/embb_mtapi_network_buffer.h
+3
-3
mtapi_network_c/src/embb_mtapi_network_socket.c
+2
-1
mtapi_network_c/src/embb_mtapi_network_socket.h
+2
-2
mtapi_network_c/test/embb_mtapi_network_test_buffer.cc
+2
-1
mtapi_network_c/test/embb_mtapi_network_test_buffer.h
+3
-3
mtapi_network_c/test/embb_mtapi_network_test_socket.cc
+4
-2
mtapi_network_c/test/embb_mtapi_network_test_socket.h
+3
-3
mtapi_network_c/test/embb_mtapi_network_test_task.cc
+1
-2
mtapi_network_c/test/embb_mtapi_network_test_task.h
+3
-3
No files found.
mtapi_network_c/src/embb_mtapi_network.c
View file @
9d9184e6
...
@@ -269,8 +269,7 @@ static int embb_mtapi_network_thread(void * args) {
...
@@ -269,8 +269,7 @@ static int embb_mtapi_network_thread(void * args) {
// socket, &buffer);
// socket, &buffer);
embb_mtapi_network_buffer_clear
(
&
buffer
);
embb_mtapi_network_buffer_clear
(
&
buffer
);
}
}
else
if
(
operation
==
EMBB_MTAPI_NETWORK_RETURN_RESULT
)
{
else
if
(
operation
==
EMBB_MTAPI_NETWORK_RETURN_RESULT
)
{
int
task_status
;
int
task_status
;
int
task_id
;
int
task_id
;
int
task_tag
;
int
task_tag
;
...
@@ -357,7 +356,8 @@ void mtapi_network_plugin_initialize(
...
@@ -357,7 +356,8 @@ void mtapi_network_plugin_initialize(
&
plugin
->
sockets
[
0
],
host
,
port
,
max_connections
);
&
plugin
->
sockets
[
0
],
host
,
port
,
max_connections
);
plugin
->
buffer_size
=
buffer_size
;
plugin
->
buffer_size
=
buffer_size
;
err
=
embb_thread_create
(
&
plugin
->
thread
,
NULL
,
embb_mtapi_network_thread
,
NULL
);
err
=
embb_thread_create
(
&
plugin
->
thread
,
NULL
,
embb_mtapi_network_thread
,
NULL
);
if
(
EMBB_SUCCESS
==
err
)
{
if
(
EMBB_SUCCESS
==
err
)
{
local_status
=
MTAPI_SUCCESS
;
local_status
=
MTAPI_SUCCESS
;
}
}
...
@@ -503,7 +503,8 @@ mtapi_action_hndl_t mtapi_network_action_create(
...
@@ -503,7 +503,8 @@ mtapi_action_hndl_t mtapi_network_action_create(
action
->
domain_id
=
domain_id
;
action
->
domain_id
=
domain_id
;
action
->
job_id
=
remote_job_id
;
action
->
job_id
=
remote_job_id
;
embb_mtapi_network_buffer_initialize
(
&
action
->
send_buffer
,
plugin
->
buffer_size
);
embb_mtapi_network_buffer_initialize
(
&
action
->
send_buffer
,
plugin
->
buffer_size
);
embb_mutex_init
(
&
action
->
send_mutex
,
0
);
embb_mutex_init
(
&
action
->
send_mutex
,
0
);
action
->
host
=
host
;
action
->
host
=
host
;
...
...
mtapi_network_c/src/embb_mtapi_network.h
View file @
9d9184e6
...
@@ -24,8 +24,8 @@
...
@@ -24,8 +24,8 @@
* POSSIBILITY OF SUCH DAMAGE.
* POSSIBILITY OF SUCH DAMAGE.
*/
*/
#ifndef MTAPI_C_SRC_EMBB_MTAPI_NETWORK_H_
#ifndef MTAPI_
NETWORK_
C_SRC_EMBB_MTAPI_NETWORK_H_
#define MTAPI_C_SRC_EMBB_MTAPI_NETWORK_H_
#define MTAPI_
NETWORK_
C_SRC_EMBB_MTAPI_NETWORK_H_
#include <stdint.h>
#include <stdint.h>
...
@@ -43,4 +43,4 @@ void embb_mtapi_network_finalize();
...
@@ -43,4 +43,4 @@ void embb_mtapi_network_finalize();
}
}
#endif
#endif
#endif // MTAPI_C_SRC_EMBB_MTAPI_NETWORK_H_
#endif // MTAPI_
NETWORK_
C_SRC_EMBB_MTAPI_NETWORK_H_
mtapi_network_c/src/embb_mtapi_network_buffer.h
View file @
9d9184e6
...
@@ -24,8 +24,8 @@
...
@@ -24,8 +24,8 @@
* POSSIBILITY OF SUCH DAMAGE.
* POSSIBILITY OF SUCH DAMAGE.
*/
*/
#ifndef MTAPI_C_SRC_EMBB_MTAPI_NETWORK_BUFFER_H_
#ifndef MTAPI_
NETWORK_
C_SRC_EMBB_MTAPI_NETWORK_BUFFER_H_
#define MTAPI_C_SRC_EMBB_MTAPI_NETWORK_BUFFER_H_
#define MTAPI_
NETWORK_
C_SRC_EMBB_MTAPI_NETWORK_BUFFER_H_
#include <stdint.h>
#include <stdint.h>
...
@@ -103,4 +103,4 @@ int embb_mtapi_network_buffer_pop_front_rawdata(
...
@@ -103,4 +103,4 @@ int embb_mtapi_network_buffer_pop_front_rawdata(
}
}
#endif
#endif
#endif // MTAPI_C_SRC_EMBB_MTAPI_NETWORK_BUFFER_H_
#endif // MTAPI_
NETWORK_
C_SRC_EMBB_MTAPI_NETWORK_BUFFER_H_
mtapi_network_c/src/embb_mtapi_network_socket.c
View file @
9d9184e6
...
@@ -216,5 +216,6 @@ int embb_mtapi_network_socket_recvbuffer_sized(
...
@@ -216,5 +216,6 @@ int embb_mtapi_network_socket_recvbuffer_sized(
int
embb_mtapi_network_socket_recvbuffer
(
int
embb_mtapi_network_socket_recvbuffer
(
embb_mtapi_network_socket_t
*
that
,
embb_mtapi_network_socket_t
*
that
,
embb_mtapi_network_buffer_t
*
buffer
)
{
embb_mtapi_network_buffer_t
*
buffer
)
{
return
embb_mtapi_network_socket_recvbuffer_sized
(
that
,
buffer
,
buffer
->
capacity
);
return
embb_mtapi_network_socket_recvbuffer_sized
(
that
,
buffer
,
buffer
->
capacity
);
}
}
mtapi_network_c/src/embb_mtapi_network_socket.h
View file @
9d9184e6
...
@@ -24,8 +24,8 @@
...
@@ -24,8 +24,8 @@
* POSSIBILITY OF SUCH DAMAGE.
* POSSIBILITY OF SUCH DAMAGE.
*/
*/
#ifndef MTAPI_C_SRC_EMBB_MTAPI_NETWORK_SOCKET_H_
#ifndef MTAPI_
NETWORK_
C_SRC_EMBB_MTAPI_NETWORK_SOCKET_H_
#define MTAPI_C_SRC_EMBB_MTAPI_NETWORK_SOCKET_H_
#define MTAPI_
NETWORK_
C_SRC_EMBB_MTAPI_NETWORK_SOCKET_H_
#include <stdint.h>
#include <stdint.h>
#include <embb_mtapi_network_buffer.h>
#include <embb_mtapi_network_buffer.h>
...
...
mtapi_network_c/test/embb_mtapi_network_test_buffer.cc
View file @
9d9184e6
...
@@ -32,7 +32,8 @@
...
@@ -32,7 +32,8 @@
NetworkBufferTest
::
NetworkBufferTest
()
{
NetworkBufferTest
::
NetworkBufferTest
()
{
CreateUnit
(
"mtapi network buffer test"
).
Add
(
&
NetworkBufferTest
::
TestBasic
,
this
);
CreateUnit
(
"mtapi network buffer test"
).
Add
(
&
NetworkBufferTest
::
TestBasic
,
this
);
}
}
void
NetworkBufferTest
::
TestBasic
()
{
void
NetworkBufferTest
::
TestBasic
()
{
...
...
mtapi_network_c/test/embb_mtapi_network_test_buffer.h
View file @
9d9184e6
...
@@ -24,8 +24,8 @@
...
@@ -24,8 +24,8 @@
* POSSIBILITY OF SUCH DAMAGE.
* POSSIBILITY OF SUCH DAMAGE.
*/
*/
#ifndef MTAPI_C_TEST_EMBB_MTAPI_NETWORK_TEST_BUFFER_H_
#ifndef MTAPI_
NETWORK_
C_TEST_EMBB_MTAPI_NETWORK_TEST_BUFFER_H_
#define MTAPI_C_TEST_EMBB_MTAPI_NETWORK_TEST_BUFFER_H_
#define MTAPI_
NETWORK_
C_TEST_EMBB_MTAPI_NETWORK_TEST_BUFFER_H_
#include <partest/partest.h>
#include <partest/partest.h>
...
@@ -37,4 +37,4 @@ class NetworkBufferTest : public partest::TestCase {
...
@@ -37,4 +37,4 @@ class NetworkBufferTest : public partest::TestCase {
void
TestBasic
();
void
TestBasic
();
};
};
#endif // MTAPI_C_TEST_EMBB_MTAPI_NETWORK_TEST_BUFFER_H_
#endif // MTAPI_
NETWORK_
C_TEST_EMBB_MTAPI_NETWORK_TEST_BUFFER_H_
mtapi_network_c/test/embb_mtapi_network_test_socket.cc
View file @
9d9184e6
...
@@ -33,7 +33,8 @@
...
@@ -33,7 +33,8 @@
NetworkSocketTest
::
NetworkSocketTest
()
{
NetworkSocketTest
::
NetworkSocketTest
()
{
CreateUnit
(
"mtapi network socket test"
).
Add
(
&
NetworkSocketTest
::
TestBasic
,
this
);
CreateUnit
(
"mtapi network socket test"
).
Add
(
&
NetworkSocketTest
::
TestBasic
,
this
);
}
}
void
NetworkSocketTest
::
TestBasic
()
{
void
NetworkSocketTest
::
TestBasic
()
{
...
@@ -52,7 +53,8 @@ void NetworkSocketTest::TestBasic() {
...
@@ -52,7 +53,8 @@ void NetworkSocketTest::TestBasic() {
err
=
embb_mtapi_network_socket_initialize
(
&
server_sock
);
err
=
embb_mtapi_network_socket_initialize
(
&
server_sock
);
PT_EXPECT
(
err
!=
0
);
PT_EXPECT
(
err
!=
0
);
err
=
embb_mtapi_network_socket_bind_and_listen
(
&
server_sock
,
"127.0.0.1"
,
4711
,
5
);
err
=
embb_mtapi_network_socket_bind_and_listen
(
&
server_sock
,
"127.0.0.1"
,
4711
,
5
);
PT_EXPECT
(
err
!=
0
);
PT_EXPECT
(
err
!=
0
);
err
=
embb_mtapi_network_socket_select
(
&
server_sock
,
1
,
1
);
err
=
embb_mtapi_network_socket_select
(
&
server_sock
,
1
,
1
);
...
...
mtapi_network_c/test/embb_mtapi_network_test_socket.h
View file @
9d9184e6
...
@@ -24,8 +24,8 @@
...
@@ -24,8 +24,8 @@
* POSSIBILITY OF SUCH DAMAGE.
* POSSIBILITY OF SUCH DAMAGE.
*/
*/
#ifndef MTAPI_C_TEST_EMBB_MTAPI_NETWORK_TEST_SOCKET_H_
#ifndef MTAPI_
NETWORK_
C_TEST_EMBB_MTAPI_NETWORK_TEST_SOCKET_H_
#define MTAPI_C_TEST_EMBB_MTAPI_NETWORK_TEST_SOCKET_H_
#define MTAPI_
NETWORK_
C_TEST_EMBB_MTAPI_NETWORK_TEST_SOCKET_H_
#include <partest/partest.h>
#include <partest/partest.h>
...
@@ -37,4 +37,4 @@ class NetworkSocketTest : public partest::TestCase {
...
@@ -37,4 +37,4 @@ class NetworkSocketTest : public partest::TestCase {
void
TestBasic
();
void
TestBasic
();
};
};
#endif // MTAPI_C_TEST_EMBB_MTAPI_NETWORK_TEST_SOCKET_H_
#endif // MTAPI_
NETWORK_
C_TEST_EMBB_MTAPI_NETWORK_TEST_SOCKET_H_
mtapi_network_c/test/embb_mtapi_network_test_task.cc
View file @
9d9184e6
...
@@ -31,8 +31,7 @@
...
@@ -31,8 +31,7 @@
#include <embb/base/c/internal/unused.h>
#include <embb/base/c/internal/unused.h>
#define MTAPI_CHECK_STATUS(status) \
#define MTAPI_CHECK_STATUS(status) PT_ASSERT(MTAPI_SUCCESS == status)
PT_ASSERT(MTAPI_SUCCESS == status)
#define NETWORK_DOMAIN 1
#define NETWORK_DOMAIN 1
#define NETWORK_LOCAL_NODE 3
#define NETWORK_LOCAL_NODE 3
...
...
mtapi_network_c/test/embb_mtapi_network_test_task.h
View file @
9d9184e6
...
@@ -24,8 +24,8 @@
...
@@ -24,8 +24,8 @@
* POSSIBILITY OF SUCH DAMAGE.
* POSSIBILITY OF SUCH DAMAGE.
*/
*/
#ifndef MTAPI_C_TEST_EMBB_MTAPI_NETWORK_TEST_TASK_H_
#ifndef MTAPI_
NETWORK_
C_TEST_EMBB_MTAPI_NETWORK_TEST_TASK_H_
#define MTAPI_C_TEST_EMBB_MTAPI_NETWORK_TEST_TASK_H_
#define MTAPI_
NETWORK_
C_TEST_EMBB_MTAPI_NETWORK_TEST_TASK_H_
#include <partest/partest.h>
#include <partest/partest.h>
...
@@ -37,4 +37,4 @@ class NetworkTaskTest : public partest::TestCase {
...
@@ -37,4 +37,4 @@ class NetworkTaskTest : public partest::TestCase {
void
TestBasic
();
void
TestBasic
();
};
};
#endif // MTAPI_C_TEST_EMBB_MTAPI_NETWORK_TEST_TASK_H_
#endif // MTAPI_
NETWORK_
C_TEST_EMBB_MTAPI_NETWORK_TEST_TASK_H_
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment