Removed "---" from comments 67/138167/6
authorAkhil Kedia <akhil.kedia@samsung.com>
Tue, 11 Jul 2017 10:08:39 +0000 (19:08 +0900)
committerAkhil Kedia <akhil.kedia@samsung.com>
Mon, 17 Jul 2017 05:23:42 +0000 (14:23 +0900)
These were added for emphasis, removed to better conform with coding style.

Change-Id: Id9141de9cb4463704e737c3c7d8afe29851a027d
Signed-off-by: Akhil Kedia <akhil.kedia@samsung.com>
samples/sample_batch.js
samples/sample_simple.js
src/js/https_incoming.js
src/modules/iotjs_module_https.c

index 186af0f41f514a0b3b21f9d2ddafad7e51b7bfda..a2f6332c54d62c73eca380145a6e4481a5114597 100644 (file)
@@ -66,7 +66,7 @@ function writeData() {
 }
 
 function readData() {
-  console.log('-----Reading data from file-------')
+  console.log('Reading data from file.')
   var fileContents = fs.readFileSync(fileName);
   fs.unlinkSync(fileName);
 
index 9473da875b4d9bb4f73b8e33735bc0c11778239b..f568dc625bb608146302eb43fc5d3b93ddc92e81 100644 (file)
@@ -36,15 +36,15 @@ function sendData(temperature) {
     var resBody = '';
 
     res.on("data", function (chunk) {
-      console.log('----Received response from server ----');
+      console.log('Received response from server');
       resBody += chunk.toString();
       console.log(resBody);
     });
 
     res.on("end", function () {
-      console.log('----Request Ended. Final data sent by the server----');
+      console.log('Request Ended. Final data sent by the server - ');
       console.log(resBody);
-      console.log('----Waiting for next Interval----\n');
+      console.log('Waiting for next Interval\n');
     });
   });
 
index 7fb8143cab7dd66e902f70450c8d4b4a894438fd..a3f257dfee14638ca3baf42703c92b0351682368 100644 (file)
@@ -85,7 +85,7 @@ var createHTTPParser = function(incoming) {
   return parser;
 };
 
-// ------------- HTTP PARSER CALLBACKS -------------
+// HTTP PARSER CALLBACKS
 // This is called when http header is fragmented and
 // HTTPParser sends it to JS in separate pieces.
 function parserOnHeaders(headers, url) {
@@ -112,7 +112,7 @@ function parserOnHeadersComplete(info) {
   parser.incoming.statusMessage = info.status_msg;
   parser.incoming.started = true;
 
-  // For client side, if response to 'HEAD' request, we will skip parsing body
+  // If response is to 'HEAD' request, skip parsing body
   if (parser.incoming.statusCode == 100) {
     return false;
   }
@@ -153,7 +153,7 @@ function parserOnMessageComplete() {
   }
 }
 
-//------------ LIBCURL PARSER CALLBACKS -----------------
+// LIBCURL PARSER CALLBACKS
 // Called by libcurl when Request is Done. Finish parser and unref
 function cbOnEnd() {
   var incoming = this;
index dd6f2d22fd5916ea262541c87d4606a4f36a4c29..c3c0d5cf7a750c7d7c06c776d598a4e7e74562cc 100644 (file)
@@ -26,7 +26,7 @@
 void iotjs_https_destroy(iotjs_https_t* https_data);
 IOTJS_DEFINE_NATIVE_HANDLE_INFO(https);
 
-//-------------Constructor------------
+// CONSTRUCTOR
 iotjs_https_t* iotjs_https_create(const char* URL, const char* method,
                                   const char* ca, const char* cert,
                                   const char* key, const iotjs_jval_t* jthis) {
@@ -109,7 +109,7 @@ void iotjs_https_destroy(iotjs_https_t* https_data) {
   IOTJS_RELEASE(https_data);
 }
 
-//----------------Utility Functions------------------
+// UTILITY FUNCTIONS
 void iotjs_https_check_done(iotjs_https_t* https_data) {
   IOTJS_VALIDATED_STRUCT_METHOD(iotjs_https_t, https_data);
   char* done_url;
@@ -341,7 +341,7 @@ void iotjs_https_call_read_onwrite_async(iotjs_https_t* https_data) {
                  0);
 }
 
-// ------------Functions almost directly called by JS----------
+// FUNCTIONS ALMOST DIRECTLY CALLED BY JS
 // Add a header to outgoing request
 void iotjs_https_add_header(iotjs_https_t* https_data,
                             const char* char_header) {
@@ -427,7 +427,7 @@ void iotjs_https_set_timeout(long ms, iotjs_https_t* https_data) {
 }
 
 
-//--------------CURL Callbacks------------------
+// LIBCURL CALLBACKS
 // Read callback is actually to write data to outgoing request
 size_t iotjs_https_curl_read_callback(void* contents, size_t size, size_t nmemb,
                                       void* userp) {
@@ -567,7 +567,7 @@ size_t iotjs_https_curl_write_callback(void* contents, size_t size,
 }
 
 
-//--------------LibTUV Callbacks------------------
+// LIBTUV CALLBACKS
 // Callback called on closing handles during cleanup
 void iotjs_https_uv_close_callback(uv_handle_t* handle) {
   iotjs_https_t* https_data = (iotjs_https_t*)handle->data;
@@ -642,7 +642,7 @@ void iotjs_https_uv_socket_timeout_callback(uv_timer_t* timer) {
   }
 }
 
-//--------------https_poll Functions------------------
+// HTTPS_POLL FUNCTIONS
 iotjs_https_poll_t* iotjs_https_poll_create(uv_loop_t* loop,
                                             curl_socket_t sockfd,
                                             iotjs_https_t* https_data) {
@@ -706,8 +706,7 @@ void iotjs_https_poll_destroy(iotjs_https_poll_t* poll_data) {
   IOTJS_RELEASE(poll_data);
 }
 
-// ------------JHANDLERS----------------
-
+// JHANDLERS
 JHANDLER_FUNCTION(createRequest) {
   DJHANDLER_CHECK_THIS(object);
   DJHANDLER_CHECK_ARGS(1, object);